UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'n3DTsWZXzFwZUK5AJ7AUZjWBKn7InzyDKnxU6gfgQ/I='
WHERE
key_id = '37484a10b9d599e5a3636c65970f9f44f58ba5dc5c7cec2a1947d07bcf067dba'
AND (
token = 'n3DTsWZXzFwZUK5AJ7AUZjWBKn7InzyDKnxU6gfgQ/I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)