UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9Xf/J5bHclVWK4+W0d3676WAD1lAt/6q0yi431IsWxk=' 
WHERE 
  key_id = '722812fe01e77c95a2eaeb53e71b49ba0ab3e6672cc5c20b777511352b1df8b1' 
  AND (
    token = '9Xf/J5bHclVWK4+W0d3676WAD1lAt/6q0yi431IsWxk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00079