UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LNHYdZ/8eOfoBpR/7yVeCTfWNwcqwK6ApJgM81STPCI=' 
WHERE 
  key_id = 'db3f40f90c73d7dfd0786a322df2fb3c6ae1a076df051dadce2670a70ca0da15' 
  AND (
    token = 'LNHYdZ/8eOfoBpR/7yVeCTfWNwcqwK6ApJgM81STPCI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016