UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'QhVv0/0FXHG5s9ZV/8SDDJ5BbA/k0v8wkp424W4eGIY=' 
WHERE 
  key_id = 'eebc8a24bd2c4f295d10261a1430d24d915c3517a30a5ceaad2880c1b6bbe7fb' 
  AND (
    token = 'QhVv0/0FXHG5s9ZV/8SDDJ5BbA/k0v8wkp424W4eGIY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029