UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lAlefQUD2fmQO/DzxMYuLrSQsCUAXXUjPAVJm075dA0='
WHERE
key_id = '63c19cef432cf95246d4af884bc608297418e89099cf751c438ffe6ea9a0930c'
AND (
token = 'lAlefQUD2fmQO/DzxMYuLrSQsCUAXXUjPAVJm075dA0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)