UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Wt7tGYURgnPXb6Qy90WvWgZnhKsskZhvRYqeTCBDd8I=' 
WHERE 
  key_id = '61db1053f7c14e9ce6a1e296bce50aa94564629814cb022c3dfaad5c1026cdc6' 
  AND (
    token = 'Wt7tGYURgnPXb6Qy90WvWgZnhKsskZhvRYqeTCBDd8I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029