UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uf8PVl7QB94rH7ZdJeTdrGYqCv0IN+ojK4AbdfLOR/c=' 
WHERE 
  key_id = '91d765ae4f91821a16b3a22438c07c2763e9b8ec39caed80a3506a99b8f6e205' 
  AND (
    token = 'uf8PVl7QB94rH7ZdJeTdrGYqCv0IN+ojK4AbdfLOR/c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036