UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3/LTOjkFU4VAX6WfxnBxEC416H6mIyn+9VU9wfFOQvY='
WHERE
key_id = '403e52c5c6511012412e698c4fe9e67c2a6f01c8b9746a07ae52b240841a7eb9'
AND (
token = '3/LTOjkFU4VAX6WfxnBxEC416H6mIyn+9VU9wfFOQvY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)