UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jXy+qUzSVzD45xkOl+hal5Iu6Xk4/4rq9st+GhHxjWs='
WHERE
key_id = '6204e718404d94fd517b0c5080a433f2611eaf00ff4de4985399b76c280057ac'
AND (
token = 'jXy+qUzSVzD45xkOl+hal5Iu6Xk4/4rq9st+GhHxjWs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)