UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ogh+C5dFLFB5TX9a0yCzInqcl0Hmk7+kh25fH6TfWLk='
WHERE
key_id = 'cf1ad0c8fd410dff6bf2594148abec50169aab02b6ee6269ec8980b2245eef78'
AND (
token = 'Ogh+C5dFLFB5TX9a0yCzInqcl0Hmk7+kh25fH6TfWLk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)