UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zCkMaMk0Rl/izD0ehuFpmq2hz4zWANUcWh4i3ViUwWw=' 
WHERE 
  key_id = '226b3538e747e68934d24cbb9811351feaf3f1a1d362deaf91caa4d954e8b08b' 
  AND (
    token = 'zCkMaMk0Rl/izD0ehuFpmq2hz4zWANUcWh4i3ViUwWw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018