UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VzmwZ6XTYXEV0YAKKvbFgKudCgD/lySP52YPoBOzb6A='
WHERE
key_id = 'ca7801e6ccae44fef6fd270f88712f9ad3e48e26bd4a54a365897a2f43e0d70c'
AND (
token = 'VzmwZ6XTYXEV0YAKKvbFgKudCgD/lySP52YPoBOzb6A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)