UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bKT8ZwUUicD+q2zOMVoAU2MfA2LByedN+M5mZ1F4z3g=' 
WHERE 
  key_id = '5c02ce711e0096b3cc93947cd43dde910bd654388725c4a526a9faa8dc88e3e1' 
  AND (
    token = 'bKT8ZwUUicD+q2zOMVoAU2MfA2LByedN+M5mZ1F4z3g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031