UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/qgNMmWQ1arTeCHNIHDi4u3p8gPn6ecJIQ7RMXrpgQU=' 
WHERE 
  key_id = '9521113fb7577d640e14a07f6d0321417bc6b533658c9db9363b65cdf6d82220' 
  AND (
    token = '/qgNMmWQ1arTeCHNIHDi4u3p8gPn6ecJIQ7RMXrpgQU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033