UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7bm+zgIfKmTjuaim6ck4yuhlJmoTjNp8OLQN0xEnXMc=' 
WHERE 
  key_id = '9aedb2735e9806aeb8316475fbbdfdbdc64ac18a32c4e35756655fd89724cc8e' 
  AND (
    token = '7bm+zgIfKmTjuaim6ck4yuhlJmoTjNp8OLQN0xEnXMc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033