UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xIJalH+Kt4eRc/NKSRfihtuKpsyF/XnWl2Nk+jLJb2Q='
WHERE
key_id = '0d574f8c2f5f422acb6357449d6ab7fbebbb25e60ab05d204a23927ce86c0f6b'
AND (
token = 'xIJalH+Kt4eRc/NKSRfihtuKpsyF/XnWl2Nk+jLJb2Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)