UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'L+tM+lXk8yrHWNbEuCjBSkmna9rEy6w9YqbdA06+zes=' 
WHERE 
  key_id = 'df5baf7979a34e127bdd2262947487fa377979355d589253ea8417db8b46fbb7' 
  AND (
    token = 'L+tM+lXk8yrHWNbEuCjBSkmna9rEy6w9YqbdA06+zes=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044