UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hacfulNsyCp+UusoU//irraLeJRJPE/0F1PZaaF8YKE='
WHERE
key_id = 'ffb83926ec4fed672444bc4ec134bd634de1262e8a148a2d2d5e7bf6a8e3a34c'
AND (
token = 'hacfulNsyCp+UusoU//irraLeJRJPE/0F1PZaaF8YKE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)