UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '98BStUQ1JneEsspakw9TybsbVs5T3DUKtk1rz+wf0oQ='
WHERE
key_id = '57e6ffaf83c46fcf3c0abe1ffe5fabd3c1fc34a8e6c8a3f423b513f91b3929d2'
AND (
token = '98BStUQ1JneEsspakw9TybsbVs5T3DUKtk1rz+wf0oQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)