UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/eGnXluBHg8ZLqbayKsYt+Yxh7Uqp0Y0OKnQ480hxV0=' 
WHERE 
  key_id = 'e51a29ce8b6456b90662a28a38dd40868647c61c908ed73c6efe8f4c8f6e06f0' 
  AND (
    token = '/eGnXluBHg8ZLqbayKsYt+Yxh7Uqp0Y0OKnQ480hxV0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021