UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xGnztYPxHVYZ6ZLTIzFytoEWrZgh3lX9zJrOytWM/LQ='
WHERE
key_id = '1e87a8941fdf59414b82b33d7d2eeeb07acd2bc3572baceb8be47ccc11be2efa'
AND (
token = 'xGnztYPxHVYZ6ZLTIzFytoEWrZgh3lX9zJrOytWM/LQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)