UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vYmtaLB03lmgppy6uwjj3kr3NBj6/2Gj3Okmmih0GiA=' 
WHERE 
  key_id = '53eb47c94219c0ee283e15da8ef064a24575bb381bddbf5c8247a4d6b7b91b2c' 
  AND (
    token = 'vYmtaLB03lmgppy6uwjj3kr3NBj6/2Gj3Okmmih0GiA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017