UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'F02iwRJ7o0g/brFrC9aiY9zT2meZVDV4WcR5pNkhanU=' 
WHERE 
  key_id = 'fe99d2012cbf23a9724ac87588740cf3b19ba206b6e5ea0a719975f3b4966aea' 
  AND (
    token = 'F02iwRJ7o0g/brFrC9aiY9zT2meZVDV4WcR5pNkhanU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022