UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PbVc5qFUgzgF0fRo0DAxB0ASkLW0T5+LQRdHdr0qcu4=' 
WHERE 
  key_id = '55c48be8296cc321aec19482df4d72287d005cc8161c14c91522e8d86294811f' 
  AND (
    token = 'PbVc5qFUgzgF0fRo0DAxB0ASkLW0T5+LQRdHdr0qcu4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00125