UPDATE
cscart_june_setuplock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'O4yegBCHeObPQog3y0lRmVjjSL6dj4CGPDlAJr5rZ90='
WHERE
key_id = 'f76d4be172201909783184b54e5a887dcdb560fb25c42424b92a7d2f7ba92495'
AND (
token = 'O4yegBCHeObPQog3y0lRmVjjSL6dj4CGPDlAJr5rZ90='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)