UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mmw0a9CnVFr/bK11rEnNiTHr8LOERqMbcaLvgbVkH8o=' 
WHERE 
  key_id = '07269a8f4e8f738f40bac11e586867bfda171277ff8a4af195c23c08c3c43a73' 
  AND (
    token = 'mmw0a9CnVFr/bK11rEnNiTHr8LOERqMbcaLvgbVkH8o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048