UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AO2+MLR/0tooR943dxZK8OEj6SLkKxxCTgn+nzHIUk0='
WHERE
key_id = '60b6448e09a329bcf6736911580c1c61ce98fa675904fbaf4159aed8ca4e02c0'
AND (
token = 'AO2+MLR/0tooR943dxZK8OEj6SLkKxxCTgn+nzHIUk0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)