UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7VYIHV/fh9qxVcavuO9g8fmH6AZ5PB8sFj5SwtLT9q8=' 
WHERE 
  key_id = 'c33abe09bceea69b6fc6a8f8de999a890a29218a881d44aa00d18d88383a7b36' 
  AND (
    token = '7VYIHV/fh9qxVcavuO9g8fmH6AZ5PB8sFj5SwtLT9q8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030