UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/vT38Mh5rb0Zi4nKiYwVNdfHhcl9rOT0AC4wNPQlXCg='
WHERE
key_id = '84a6bbef39126c386980b45980cd7762aed42ed38e9a6e374c7ddd15548ca460'
AND (
token = '/vT38Mh5rb0Zi4nKiYwVNdfHhcl9rOT0AC4wNPQlXCg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)