UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '++WTS6BxnKdc3py82gCHUY7oIjXV6ZjLza8w/theExE=' 
WHERE 
  key_id = 'f3a480af5112960fecb1f5259b9b102206254a91a7e046872f8823f936eff394' 
  AND (
    token = '++WTS6BxnKdc3py82gCHUY7oIjXV6ZjLza8w/theExE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031