UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'cWOJ0YzKRqFeDwRMgthdZ7rWLMEMmTNI+t9ISDml/Eo=' 
WHERE 
  key_id = '1759eaa2e2a88265aaf0e620aa1de10d23c67840467c65fe6a479008ba14a52d' 
  AND (
    token = 'cWOJ0YzKRqFeDwRMgthdZ7rWLMEMmTNI+t9ISDml/Eo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047