UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hxLeuFZViZfZ8G4SEFGQogOsRA8OiEpwSg/YE43Gqqk='
WHERE
key_id = '2735f58666f97fc098043c7a298de5b6ebc583a1a9329bf267b9fbfbf17cba5b'
AND (
token = 'hxLeuFZViZfZ8G4SEFGQogOsRA8OiEpwSg/YE43Gqqk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)