UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7lAHLgGGl3WNFaelrIX/eVIBMAAtvWZyF0untZDWaSI=' 
WHERE 
  key_id = '2d03fcccc397bf8dbd3984917c92fdbe41c30ed6cf55ef9d0c1a2ec81ac331d4' 
  AND (
    token = '7lAHLgGGl3WNFaelrIX/eVIBMAAtvWZyF0untZDWaSI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039