UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qREA7qXUdqGtv5VvNRUq/Zo780r/XKbHmRpYZllgV/M=' 
WHERE 
  key_id = 'b73f3a8d0b38c3a696f049c04f91b3da44b51e40d4cc68bc4bf0a777947ddcbc' 
  AND (
    token = 'qREA7qXUdqGtv5VvNRUq/Zo780r/XKbHmRpYZllgV/M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029