UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CdVBzgmmg21k9FXU7jDrnUvnBw1hRR0y2R/F6xrxoJY=' 
WHERE 
  key_id = 'ef8f7a3fcd8d980b3719eb258f4aa97f9961b9dbc9bda0ec1d2e46925ddb280a' 
  AND (
    token = 'CdVBzgmmg21k9FXU7jDrnUvnBw1hRR0y2R/F6xrxoJY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015