UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DHTTvkg/gQg1q6GbeXPKhiUNayrmDrMjefIY6MTYz3I=' 
WHERE 
  key_id = 'df86a3778ce2f5312e35152fc4360c7adba4a3e9b106d16cc2115b8d1f28bc1a' 
  AND (
    token = 'DHTTvkg/gQg1q6GbeXPKhiUNayrmDrMjefIY6MTYz3I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030