UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '056EvK0NrQPI9uutHVU75siroOM+h2H9dj6cMjR4ZtI=' 
WHERE 
  key_id = '9c9f2f906ca3ddda6c67bccb86a701731fef925b478b971b897510b604bc1e51' 
  AND (
    token = '056EvK0NrQPI9uutHVU75siroOM+h2H9dj6cMjR4ZtI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036