UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Ckr88XfxRdGI7iNX8xZKb2Z3tdJYK9txKy6tv7vroKY=' 
WHERE 
  key_id = '898d6cca648fc9d2f9a595e59eaafa2e8ed14e302c1ed193898c4a66d27e38b3' 
  AND (
    token = 'Ckr88XfxRdGI7iNX8xZKb2Z3tdJYK9txKy6tv7vroKY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034